package spring.aop.jdkproxy;

public class JdkProxyTest {
    public static void main(String[] args) {
        Service service = new Service();
        IService proxyInstance = (IService)Ih.getTargetProxyInstance(service);
        String str = proxyInstance.say(100);
        System.out.println("result=" + str);
        System.out.println("------------------");
        // 自己猜想的动态类
        proxyInstance = (IService)Ih.getMyTargetProxyInstance(service);
        str = proxyInstance.say(99);
        System.out.println("result=" + str);
    }
}
